﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DAL;
namespace BUS
{
    public class Sach_BUS
    {
        Sach_DAO ws;
        public Sach_DTO[] LayDanhSachSach()
        {
            ws = new Sach_DAO();
            Sach_DTO[] tg = ws.DanhSachSach();
            return tg;
        }

        public Sach_DTO DanhSachSach_TheoMaSach(String str_Ma)
        {
            ws = new Sach_DAO();
            Sach_DTO Sach = ws.DanhSachSach_TheoMaSach(str_Ma);
            return Sach;
        }

        public string MaSachTang()
        {
            ws = new Sach_DAO();
            return ws.MaSachTang();
        }

        public int ThemSach(Sach_DTO dto)
        {
            ws = new Sach_DAO();
            return ws.ThemSach(dto);
        }

        public int XoaSach(Sach_DTO dto)
        {
            ws = new Sach_DAO();
            return ws.XoaSach(dto);
        }

        public int CapNhatSach(Sach_DTO dto)
        {
            ws = new Sach_DAO();
            return ws.CapNhatSach(dto);
        }
    }
}